/**
 * @file 20.c
 * @author your name (you@domain.com)
 * @brief 交换两个数字
 * @version 0.1
 * @date 2022-04-13
 * 
 * @copyright Copyright (c) 2022
 * 
 */
#include <stdio.h>

int main()
{
    double firstNumber, secondNumber, temporaryVariable;
    printf("Enger first number:");
    scanf("%1f", &firstNumber);
    printf("Enter second number:");
    scanf("%1f", &secondNumber);
    // value of firstNumber is assigned to temporaryVariable
    temporaryVariable = firstNumber;
    // value of secondNumber is assigned to firstNumber
    firstNumber = secondNumber;
    // value of temporaryVariable (which contains the initial value of firstNumber)
    // is assigned to secondNumber
    secondNumber = temporaryVariable;
    printf("\nAfter swapping, firstNumber = %.2lf\n", firstNumber);
    printf("After swapping, secondNumber = %.2lf", secondNumber);

    return 0;
}
